﻿<UserControl x:Class="BlobTowerDefense.Pages.Controls.ControlsSettings_Controls"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480">

    <UserControl.Resources>
        <Storyboard x:Name="animationIn_LeftToRight">
            <DoubleAnimation From="-200" To="0" Duration="0:0:1.1"
                             Storyboard.TargetName="translateTransform"
                             Storyboard.TargetProperty="X">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseOut" Amplitude="1"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
        <Storyboard x:Name="animationIn_RightToLeft">
            <DoubleAnimation From="200" To="0" Duration="0:0:1.1"
                             Storyboard.TargetName="translateTransform"
                             Storyboard.TargetProperty="X">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseOut" Amplitude="1"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>

        <Storyboard x:Name="animationOut_LeftToRight">
            <DoubleAnimation From="0" To="200" Duration="0:0:1.1"
                             Storyboard.TargetName="translateTransform"
                             Storyboard.TargetProperty="X">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseIn" Amplitude="1"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
        <Storyboard x:Name="animationOut_RightToLeft">
            <DoubleAnimation From="0" To="-200" Duration="0:0:1.1"
                             Storyboard.TargetName="translateTransform"
                             Storyboard.TargetProperty="X">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseIn" Amplitude="1"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
    </UserControl.Resources>


    <StackPanel x:Name="LayoutRoot">
        <StackPanel.RenderTransform>
            <TranslateTransform x:Name="translateTransform"/>
        </StackPanel.RenderTransform>
        <TextBlock Name="TextBlock_LeftHanded" 
                   Text="{Binding ConverterParameter=Settings_Label_Lefthanded, Converter={StaticResource Localization}, Source={StaticResource Localization}}"/>
        <ToggleButton Name="ToggleButton_Lefthanded" Checked="ToggleButton_Lefthanded_Checked" Unchecked="ToggleButton_Lefthanded_Unchecked" />
        <TextBlock Name="TextBlock_Sensitivity" 
                   Text="{Binding ConverterParameter=Settings_Label_Sensitivity, Converter={StaticResource Localization}, Source={StaticResource Localization}}"/>
        <Grid>
            <Slider Name="Slider_Sensitivity"
                    Minimum="0"
                    Maximum="100"
                    ValueChanged="Slider_Sensitivity_ValueChanged"/>
            <TextBlock Name="TextBlock_VolumeSounds"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Bottom"
                       Text="{Binding Value, 
                              Mode=OneWay, 
                              StringFormat=0,
                              ElementName=Slider_Sensitivity}"/>            
        </Grid>
        <TextBlock Name="TextBlock_Nickname"
                   Text="{Binding ConverterParameter=Settings_Nickname_Label, Converter={StaticResource Localization}, Source={StaticResource Localization}}"/>
        <TextBox Name="TextBox_Nickname" TextChanged="TextBox_Nickname_TextChanged">
            <TextBox.InputScope>
                <InputScope>
                    <InputScopeName NameValue="EmailUserName"/>
                </InputScope>
            </TextBox.InputScope>
        </TextBox>
    </StackPanel>
</UserControl>
